import org.zjx.client.SocketClient;
import org.zjx.core.SocketConfig;
import org.zjx.message.messages.CommandMessage;

import java.util.HashMap;
import java.util.Map;

public class HandlerClient
{
    public static void main(String[] args) {
        SocketConfig config = new SocketConfig();
        SocketClient client = new SocketClient(config);
        client.setMessageListener(System.out::println);
        client.connect();

        Map<String,Object> map = new HashMap<>();
        map.put("访问时","safsfa");

        CommandMessage commandMessage = new CommandMessage();
        commandMessage.setClientId("vsdoibsdfb45345234562");
        commandMessage.setParams(map);
        commandMessage.setCommand("Add");
        client.sendMessage(commandMessage);
    }
}
